package com.han.walkman.controller;

import com.han.walkman.entity.OrgTypeEntity;
import com.han.walkman.service.OrgTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Hanjiafeng
 * @Date: 2020/5/2
 * @Desc:
 */
@RestController
@RequestMapping("/orgType")
public class OrgTypeController {
    private final OrgTypeService orgTypeService;

    public OrgTypeController(OrgTypeService orgTypeService) {
        this.orgTypeService = orgTypeService;
    }

    @GetMapping("/findAll")
    public List<OrgTypeEntity> findAll() {
        return orgTypeService.findAll();
    }
}
